#!/bin/sh

dir=$(cd $(dirname $0); pwd)
project_dir=centos
project_name=pythonstockleeks
echo ${dir}

DOCKER_TAG=heavenbeing/pythonstockleeks:latest

sudo rm -rf data
sudo rm -f jobs/nohup.out

sudo cp -r ${dir}/../../jobs ./jobs
sudo cp -r ${dir}/../../libs ./libs
sudo cp -r ${dir}/../../web ./web
sudo cp -r ${dir}/../../supervisor ./supervisor

echo " docker build -f Dockerfile -t ${DOCKER_TAG} ."
docker build -f Dockerfile -t ${DOCKER_TAG} .
docker save -o ${dir}/../images/stockleeks-svc.tar ${DOCKER_TAG}
echo "#################################################################"
echo " docker push ${DOCKER_TAG} "

#mkdir data

sudo rm -rf jobs
sudo rm -rf libs
sudo rm -rf web
sudo rm -rf supervisor
